<?php
include("../../inc/global.inc");
include("islogin.php");
$id = intval($_GET['id']);
$head['title']='托管交易-确认收货';	
$row=$db->get_one("SELECT * FROM `sd_tuoguan` WHERE id=$id and status=4 and userid=".$per_row['id']);
if(!$row){
 echo "<script>location='/err.html';</script>";
}
if(isset($_POST['submit']) && $_POST['submit'])
{
	$array2['status'] = 5;
	$array2['updatetime'] = time();
	$true = $db->update('sd_tuoguan', $array2,"id=".$_POST['info']['tuoguanid']." and userid=".$per_row['id']);
	if($true)
	{
		
		echo "<script>location='/member/tuoguan/jiaoyichenggong1.php?fukuan=1';</script>";exit;
	}
	else
	{
		echo "<script>alert('确认收货失败，未知原因。请联系管理员');location='".HTTP_REFERER."';</script>";exit;
	}
}
$rowfahuo=$db->get_one("SELECT * FROM `sd_fahuo` WHERE tuoguanid=$id and userid=".$row['userid2']);//卖家
include("top.php");
?>
<div class="con">
		   <div class="top5"><span>您当前位置：<a href="/help/">会员助手</a> &gt;&gt; <?php echo $head['title'];?></span></div>
		   <?php include("left.php");?>
		   <div class="right">
		      <div class="y_5"></div>
		       <div class="con-tb"><span>收货信息</span></div>
			   <div class="con-t1"><span> </span></div>
               <div class="con-t2"><form action="" method="post" onsubmit="return check();">
               		<input type="hidden" name="info[tuoguanid]" value="<?php echo $id;?>" /><table width="100%" border="0" cellpadding="0" cellspacing="0" >
	                 <tr>
		                <td height="30" bgcolor="#f9e8cc" align="center">收货时间：</td>
		                <td colspan="2" bgcolor="#f9f9f9"><input type="text" class="txt5" value="<?php echo date('Y-m-d H:i:s');?>"/> </td>
	                </tr>
					 <tr>
		                <td height="30" bgcolor="#f9e8cc" align="center">产品信息：</td>
		                <td colspan="2" bgcolor="#f9f9f9">&nbsp;<a href="<?=$row['url']?>" target="_blank"><?=$row['title']?></a></td>
	                </tr>
					 <tr>
		                <td height="30" bgcolor="#f9e8cc" align="center">发货时间：</td>
		                <td colspan="2" bgcolor="#f9f9f9">&nbsp;<?=$rowfahuo['ftime']?></td>
	                </tr>
					 <tr>
		                <td height="30" bgcolor="#f9e8cc" align="center">物流公司名称：</td>
		                <td colspan="2" bgcolor="#f9f9f9">&nbsp;<?=$rowfahuo['wlgs']?>
	                     <span>*</span></td>
	                </tr>
					 <tr>
		                <td height="30" bgcolor="#f9e8cc" align="center">物流运单号：</td>
		                <td colspan="2" bgcolor="#f9f9f9">&nbsp;<?=$rowfahuo['wldh']?>
	                     <span>*</span></td>
	                </tr>
					<tr>
		                <td height="30" bgcolor="#f9e8cc" align="center">物流联系电话：</td>
		                <td width="40%" bgcolor="#f9f9f9">&nbsp;<?=$rowfahuo['wltel']?></td>
	                	<td width="39%" bgcolor="#f9f9f9" style="border-left:0px;">
						（用于货物托运到收货方能及时联系物流的电话）</td>
					</tr>
					<tr>
		                <td height="30" bgcolor="#f9e8cc" align="center">预计几天到货：</td>
		                <td colspan="2" bgcolor="#f9f9f9">&nbsp;<?=$rowfahuo['tian']?>天</td>
	                </tr>
	                 <tr>
		                <td height="64" bgcolor="#f9e8cc">&nbsp;</td>
		                <td colspan="2" bgcolor="#f9f9f9">&nbsp;<input name="submit" type="submit" class="btn" id="submit" value="确认收货"/>
		                <br /><div class="txt">请注意，在点确认收货前，请您确认您收到的产品是您需要采购的，或者您会货、款两空。</div></td>
	                </tr>
					<tr>
		                <td height="161" bgcolor="#f9e8cc">&nbsp;</td>
		                <td colspan="2" bgcolor="#f9f9f9">&nbsp;<input name="按钮" type="button" class="btn" value="我要延期"/>
		                &nbsp;&nbsp;&nbsp;
						  <span class="STYLE1">请选择：</span>
						  <input name="radiobutton" type="radio" value="radiobutton" /> 5天 
		                  <input name="radiobutton" type="radio" value="radiobutton" />10天
		                  <input name="radiobutton" type="radio" value="radiobutton" />15天    
	                	<br /><div class="txt">a.您在卖家发货后14天内没收到产品的，跟卖家谈好需要延期付款时间的。<br />
b.您收到的产品和您跟卖家商谈的不一致的，跟卖家谈好需要延期付款时间的。<br />
c.收到产品破损严重，您不可以接受的，跟卖家谈好需要延期付款时间的。<br />
d.买家、卖家商谈好退货、退款的（退款我们会将在你本次交易中扣除1%手续费）。<br />
e.延期交货时间系统设置5天、10天、15天，默认为10天。（请您根据卖家配货时间和运输时间来决定）
</div></td>
	                </tr>
					 <tr>
		                <td height="35"  align="center" bgcolor="#f9e8cc">&nbsp;</td>
		                <td colspan="2" bgcolor="#f9f9f9"><div class="txt">买家注意，请您收货时一定要当场验收您采购的产品，不要拖延时间，或者卖家也许会不承认您说的话。</div></td>
	                </tr>
                 </table></form>
             </div>
		 </div>
		 <div class="cl"></div>
</div> 
<?php include("foot.php");?>
<script>
	function check()
	{
		
	}
</script>
